#ifndef DECORATOR_PATTERN_H
#define DECORATOR_PATTERN_H

class DecShape
{
public:
    virtual ~DecShape() {}

    virtual void draw() = 0;
};

class DecRectangle : public DecShape
{
public:
    ~DecRectangle() {}

    void draw() override;
};

class DecCircle : public DecShape
{
public:
    ~DecCircle() {}

    void draw() override;
};

class DecShapeDecorator : public DecShape
{
public:
    DecShapeDecorator(DecShape* decoratedShape);
    ~DecShapeDecorator() {}

    void draw() override;

protected:
    DecShape* decoratedShape;
};

class RedDecShapeDecorator : public DecShapeDecorator
{
public:
    RedDecShapeDecorator(DecShape* decoratedShape);
    ~RedDecShapeDecorator() {}

    void draw() override;

private:
    void setRedBorder();
};

#endif // DECORATOR_PATTERN_H

/*
    DecShape* circle = new DecCircle();
    DecShapeDecorator* redCircle = new RedDecShapeDecorator(new DecCircle());
    DecShapeDecorator* redRectangle = new RedDecShapeDecorator(new DecRectangle());

    cout << "Circle with normal border" << endl;
    circle->draw();

    cout << "\nCircle of red border" << endl;
    redCircle->draw();

    cout << "\nRectangle of red border" << endl;
    redRectangle->draw();
    */
